Skip to main content
Version: 1.0.2

Payment

The Payment API facilitates the transfer of a specified asset from a source account to a destination account on the Stellar network.

Method: POST

{{URL}}/jsonrpc

Headers

NameValue
Content-Typeapplication/json

Example

Response Parameters
ParameterDescription

SourceAccount

Object

PublicKey

Mandatory

String

The public key of the source account from which the payment will be made.

Ex: "GCPLZXWATKYY3OXXHDOU3TSIUNZA5ZVBMM6P6ONGZQJHICXSFGFWNBPW"

PrivateKey

Mandatory

String

The private key associated with the source account for authentication.

Ex: ""

DestinationAccount

Object

PublicKey

Mandatory

String

The public key of the destination account that will receive the payment.

Ex: "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"

StartingBalance

Mandatory

Number

The initial balance to be assigned to the destination account if it does not already exist.

Ex: 9999

SponsorAccount

Object

PublicKey

Mandatory

String

The public key of the sponsor account responsible for paying the transaction fee.

Ex: "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"

PrivateKey

Mandatory

String

The private key associated with the sponsor account, used for authentication.

Ex: ""

IssuerAccount

Object

PublicKey

Mandatory

String

The public key of the account that issued the asset being transferred.

Ex: "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"

PrivateKey

Mandatory

String

The private key associated with the issuer account for authentication.

Ex: ""

Asset

Object

Code

Mandatory

String

The code representing the asset being transferred.

Ex: "XDUS"

IssuerKey

Mandatory

String

The public key of the account that issued the asset.

Ex: "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"

Amount

Mandatory

String

The quantity of the asset to be transferred in the payment.

Ex: "1234"

Body


{
"SourceAccount": {
"PublicKey": "GCPLZXWATKYY3OXXHDOU3TSIUNZA5ZVBMM6P6ONGZQJHICXSFGFWNBPW",
"PrivateKey": ""
},
"DestinationAccount": {
"PublicKey": "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"
},
"StartingBalance": 9999,
"SponsorAccount": {
"PublicKey": "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD",
"PrivateKey": ""
},
"IssuerAccount": {
"PublicKey": "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD",
"PrivateKey": ""
},
"Asset": {
"Code": "XDUS",
"IssuerKey": "GAHQYF2BNR5PGXPMWHOPXQA2Y3T2HVBBBF7ON7D2427T7FPZRMIRE6XD"
},
"Amount": "1234"
}

Response: 200

Response Parameters
ParameterDescription

hash

String

A unique identifier representing the transaction hash of the account creation.

Ex: "fbef2e61b8961114a285a8d1ba9c20076f13f636db4fc452dae64bf763390724"


{
"hash": "fbef2e61b8961114a285a8d1ba9c20076f13f636db4fc452dae64bf763390724"
}